﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Xml;

namespace WebRole1
{
   /// <summary>
   /// Summary description for $codebehindclassname$
   /// </summary>
   [WebService(Namespace = "http://tempuri.org/")]
   [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
   public class GeoRSSHandler : IHttpHandler
   {

      public void ProcessRequest(HttpContext context)
      {
         context.Response.ContentType = "text/xml";

         var doc = new XmlDocument();
         if (context.Request.Params["myurl"] != null)
         {
            string url = context.Request.Params["myurl"];
            doc.Load(url);
         }

         context.Response.Write(doc.InnerXml);
      }

      public bool IsReusable
      {
         get
         {
            return false;
         }
      }
   }
}
